<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
    xmlns:s="http://jboss.com/products/seam/taglib"
    xmlns:ui="http://java.sun.com/jsf/facelets"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:rich="http://richfaces.org/rich"
    xmlns:a="http://richfaces.org/a4j"
    template="layout/template.xhtml">

    <ui:define name="body">

        <h1>Seja Bem Vindo ao Quiz!</h1>
        <rich:panel>
        	<h:form>
	            <h:panelGrid columns="2">
	                <h:graphicImage value="/img/quiz.png" alt="Quiz"/>
	                <s:div styleClass="info" rendered="#{not identity.loggedIn}">
	                    <p><strong>Efetue o seu cadastro em 2 minutos!</strong></p>
	                    
	                    <s:decorate id="nomeField" template="/layout/editDois.xhtml">
			                <ui:define name="label">Nome</ui:define>
			                <h:inputTextarea cols="80" rows="3" id="nome" value="#{usuarioHome.instance.nome}" required="true"/>
			            </s:decorate>
			            
			            <s:decorate id="emailField" template="/layout/editDois.xhtml">
			                <ui:define name="label">E-mail</ui:define>
			                <h:inputTextarea cols="80" rows="3"  id="email" value="#{usuarioHome.instance.email}" required="true">
			                	<a:support event="onblur" reRender="emailField" bypassUpdates="true" ajaxSingle="true"/>
			                </h:inputTextarea>
			            </s:decorate>
			            
			            <s:decorate id="senhaField" template="/layout/editDois.xhtml">
			                <ui:define name="label">Senha</ui:define>
			                <h:inputSecret size="50" id="senha" value="#{usuarioHome.instance.senha}" required="#{!usuarioHome.managed}"/>
			            </s:decorate>
			            
			            <s:decorate id="confirmarSenhaField" template="/layout/editDois.xhtml">
			                <ui:define name="label">Confirmar Senha</ui:define>
			                <h:inputSecret size="50" id="confirmarSenha" value="#{usuarioHome.instance.confirmarSenha}" required="#{!usuarioHome.managed}"/>
			            </s:decorate>
			
			            <div style="clear:both">
			                <span class="required">*</span>
			                campos obrigatórios 
		            	</div>
		            	
		            	<div class="actionButtons">
						
						<br clear="left"/>
						
		            	<h:commandButton id="save"
		                	          value="Salvar"
		                	         action="#{usuarioHome.persist}"
		                 	      disabled="#{!usuarioHome.wired}"
		                	       rendered="#{!usuarioHome.managed}"/>
							           
						</div>	
	                </s:div>
	                
	                <s:div styleClass="info" rendered="#{identity.loggedIn}">
	                	<p><strong>Recursos disponíveis:</strong></p>
						
						<ul class="bullets">
	                        <li>Módulos implementados:
	                        	<ul>
	                        		<li>Administrador Geral</li>
	                        		<li>Administrador de Grupo</li>
	                        		<li>Grupo</li>
	                        		<li>Subgrupo</li>
	                        		<li>Usuário</li>
	                        		<li>Categoria</li>
	                        		<li>Questionário</li>
	                        		<li>Questão</li>
	                        		<li>Resposta</li>
	                        	</ul>
                        	</li>
	                        <li>Sistema de Login e Logout</li>
	                        <li>Segurança de acesso aos módulos</li>
	                        <li>Perfil personalizado por nível de usuário</li>
	                        <li>Tecnologias utilizada no projeto:
	                        	<ul>
	                        		<li>JavaServer Faces 1.2</li>
	                        		<li>Enterprise JavaBean 3.0</li>
	                        		<li>Seam Framework</li>
	                        		<li>Richfaces</li>
	                        		<li>Facelets</li>
	                        	</ul>
	                        </li>
                    	</ul>
	                </s:div>
	            </h:panelGrid>
            </h:form>
        </rich:panel>

    </ui:define>
</ui:composition>
